package cn.glutnn.auth.common.enums;

import lombok.Getter;

@Getter
public enum IsDeletedFlagEnum {
    DELETED(1, "已删除"),
    UN_DELETED(0, "未删除");

    private Integer code;
    private String desc;

    IsDeletedFlagEnum(Integer code, String message) {
        this.code = code;
        this.desc = message;
    }

    public static IsDeletedFlagEnum getByCode(int codeValue) {
        for (IsDeletedFlagEnum item : IsDeletedFlagEnum.values()) {
            if (item.code == codeValue) {
                return item;
            }
        }
        return null;
    }

}
